<template>
    <div class="app-container">
        <el-table v-loading="loading" :data="propertyData" table-layout="fixed">
            <el-table-column prop="propertyName" label="名称" />
            <el-table-column prop="propertyNumber" label="数量" />
            <el-table-column prop="addName" label="添加者" />
            <el-table-column prop="addTime" label="添加时间" />
            <el-table-column prop="modifyName" label="最后修改者" />
            <el-table-column prop="modifyTime" label="修改时间" />
        </el-table>
    </div>
</template>

<script setup name="studentPropertyInfo">
import { getdormPropertyInfoApi } from '@/api/student'

const loading = ref(true)

const propertyData = ref('')

const getData = () => {
    getdormPropertyInfoApi().then(res => {
        if (res.code == 200) {
            propertyData.value = res.data
            loading.value = false
        } else {
            loading.value = false
        }
    }).catch(err => {
        loading.value = false
    })
    setTimeout(() => {  // 这里显示刷新页面的延迟，防止在页面加载更多数据时
        loading.value = false
    }, 5000)
}
getData()
</script>
